/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package run_calculator;



public class Calculator 
{

    
    private float number1;
    private float number2;

    public Calculator(float num1, float num2) 
    {
        number1 = num1;
        number2 = num2;
    }
    
    
    @Override
    public boolean equals(Object x)
    {
        return this.number1 == ((Calculator)x).getNumber1() &&
                this.number2 == ((Calculator)x).getNumber2();
    }
    
    public float getNumber1() {
        return number1;
    }

    public void setNumber1(float number1) {
        this.number1 = number1;
    }

    public float getNumber2() {
        return number2;
    }

    public void setNumber2(float number2) {
        this.number2 = number2;
    }

    public float AddNumbers()
    {
        return number1 + number2;
    }
    public int AddAsInt()
    {
        return (int)number1 + (int)number2;
    }
    
    public boolean EqualNumbers()
    {
        return (int)number1 == (int)number2;
    }

    @Override
    public String toString() {
        return "Calculator{" + '}';
    }
    
    
   
    
    
    
    
}
